<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>后台</title>
    <link rel="stylesheet" type="text/css" href="../static/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../static/css/main.css"/>
</head>
<body>

    <div id="left_frame"class="main-wrap">
        <div class="search-wrap">
            <div class="search-content">
                <form action="<%=request.getContextPath() %>/titleSelect" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="title" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<%=request.getContextPath()%>/toForm"><i class="icon-font"></i>新增新闻</a>
<%--                         <a id="batchDel" href="<%=request.getContextPath()%>/deleteByQuery"><i class="icon-font"></i>批量删除</a> --%>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <thead>
                            <th class="tc" width="5%"></th>
                            <th>ID</th>
                            <th>标题</th>
                            <th>发布人</th>
                            <th>更新时间</th>
                            <th>操作</th>
                        </thead>
                       <tbody>
                        <c:forEach items="${postList}" var="u" varStatus="status">
							 <tr>
                            <td class="tc"><input name="chechbox" value="${u.id }" type="checkbox" ></td>
                      
                            <td>${u.id}</td>
                            <td ><a  target="_blank" href="<%=request.getContextPath() %>/tobloglist?id=${u.id}" >${u.title}</a>
                            </td>
                            <td>${u.username}</td>
                            <td>${u.creatTime}</td>
                            <td>
                                <a class="link-del" href="<%=request.getContextPath() %>/deletePostById?id=${u.id}">删除</a>
                            </td>
                        </tr>

						</c:forEach>
                       </tbody>
                    </table>
                   
                </div>
            </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>